\documentclass[12pt,AutoFakeBold,twoside]{ctexart}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage{fontspec}
\usepackage{xeCJK}
\usepackage{amsmath}
\usepackage[colorlinks,linkcolor=black,anchorcolor=black,citecolor=black,urlcolor=black]{hyperref}
\usepackage[dvipdfm]{graphicx}
\usepackage[bf]{caption}
\usepackage{ifthen}  %逻辑判断命令宏包

% 定义全局信息 - begin
\newcommand{\expIndex}{实验3}
\newcommand{\expName }{阶跃响应曲线法建模实验}
\newcommand{\authorInfo }{学号 \enspace\enspace\enspace 姓名}  
% 定义全局信息 - end

% 设置页面版式 - begin
\usepackage[dvipdfm]{geometry}
\geometry{a4paper,left=2.3cm,right=2.2cm,top=2.7cm,bottom=2cm}
\setlength{\columnsep}{1.5em}
\setlength{\columnseprule}{0pt}
\makeatletter
\newenvironment{figurehere}{\def\@captype{figure}}{}    %使用figurehere在双栏中插图
\makeatother
% 设置页面版式 - end

% 定义标题样式 - begin
\titleformat{\section}{\raggedright\zihao{4}\bfseries}{\thesection.}{0.5em}{}
\titlespacing{\section}{0pt}{10.4pt}{10.4pt}
\titleformat{\subsection}{\raggedright\zihao{-4}\bfseries}{\thesubsection.}{0.5em}{}
\titlespacing{\subsection}{0pt}{6.4pt}{1.4pt}
\titleformat{\subsubsection}{\raggedright\zihao{-4}\bfseries}{\thesubsubsection.}{0.5em}{}
\titlespacing{\subsubsection}{0pt}{6.4pt}{1.4pt}
% 定义标题样式 - end

% 设置正文样式 - begin
\linespread{1.1}
\setlength\abovedisplayskip{0pt plus 3pt minus 3pt}
\setlength\belowdisplayskip{1pt plus 3pt minus 3pt}
% 设置正文样式 - end

% 设置字体 - begin
\setmainfont[Mapping=tex-text]{Times New Roman}
\setCJKmainfont{SimSun}
% 设置字体 - end

% 设置页眉页脚 - begin
\usepackage{fancyhdr}
\newboolean{isFirstPage}         %定义一个布尔变量用于判断是否为首页
\setboolean{isFirstPage}{true}   %设定初值为true
%正文页眉页脚
\pagestyle{fancy}
\fancyhead{} % clear all fields 
\fancyhead[OC]{\expName}
\fancyhead[OR]{\thepage}
\fancyhead[EC]{\authorInfo}
\fancyhead[ER]{\thepage}
%首页页眉页脚
\fancypagestyle{plain}{%
\setboolean{isFirstPage}{false}%在palin样式的定义中将first重置为false
\lhead{} \chead{\expIndex : \expName} \rhead{\thepage}
\lfoot{} \cfoot{} \rfoot{}}
\newcommand{\makefirstpageheadrule}{   %定义首页页眉线绘制命令，这里为等宽双线
\makebox[0pt][l]{\rule[0.55\baselineskip]{\headwidth}{0.4pt}}%
\rule[0.7\baselineskip]{\headwidth}{0.4pt}}
\newcommand{\makeheadrule}{            %定义正文页页眉线绘制命令，单线
\rule[0.7\baselineskip]{\headwidth}{0.4pt}}
\renewcommand{\headrule}{%重定义headrule命令
\ifthenelse{\boolean{isFirstPage}}{\makeheadrule}{\makefirstpageheadrule}} %根据布尔变量first为true或false分别执行不同的页眉线绘制命令
%\renewcommand{\footrulewidth}{0.4pt}
% 设置页眉页脚 - end

% 定义URL断行 - begin
\makeatletter
\def\UrlAlphabet{%
    \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%
    \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%
    \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D%
    \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%
    \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
    \do\Y\do\Z}
\def\UrlDigits{\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\g@addto@macro{\UrlBreaks}{\UrlAlphabet}
\g@addto@macro{\UrlBreaks}{\UrlDigits}
\makeatother
% 定义URL断行 - end

% 自定义环境 - begin
% 插入单栏图片
\newcommand{\image}[3][200pt]{
    \begin{figure}[htbp]
        \vspace{-12pt}
        \centering
        \includegraphics[width=#1]{#2}
        \vspace{-6pt}
        \caption{#3}
        \label{#3}
        \vspace{-12pt}
    \end{figure}
}
% 插入双栏图片
\newcommand{\imagehere}[3][200pt]{
    \begin{figurehere}
        \vspace{4pt}
        \centering
        \includegraphics[width=#1]{#2}
        \vspace{-8pt}
        \caption{#3}
        \label{#3}
        \vspace{0.5ex}
    \end{figurehere}
}
% 正体微分符号
\newcommand{\zd }{\;\mathrm{d}}
% 局部公式文本距
\newenvironment{shrinkeq}[1]
{\bgroup
\addtolength\abovedisplayshortskip{#1}
\addtolength\abovedisplayskip{#1}
\addtolength\belowdisplayshortskip{#1}
\addtolength\belowdisplayskip{#1}}
{\egroup\ignorespacesafterend}
% 自定义环境 - end



%可见文档 - begin
\begin{document}
\centerline{\zihao{-2}\bfseries\expName\vspace{12.6pt} }   %标题
\centerline{\zihao{-4}\authorInfo\vspace{11.2pt}}          %作者信息
\thispagestyle{plain}

\noindent\textbf{实验内容：}

\vspace{2pt}

\begin{multicols}{2}
    %正文

\section{实验原理}

\section{实验操作步骤}

\section{实验结果分析}

\end{multicols}

\end{document}


%可见文档 - end
